import { _decorator, Component, Node, Layout, Label, RichText, AudioSource } from 'cc';
import { CreateImgs } from './CreateImgs';
import { GameManage } from './GameManage';
const { ccclass, property } = _decorator;

@ccclass('ReStart')
export class ReStart extends Component {
    @property(GameManage)
    GameMgr1:GameManage=null;
    @property(Layout)
    picsLayout:Layout=null;
    @property(RichText)
    scoreNode:RichText=null;
    @property(Node)
    Difficulty:Node=null;
    ReStart()
    {
        this.scoreNode.string=this.scoreNode.string.replace(/>\d+</,`>0<`);
        this.node.active=false;
        this.picsLayout.enabled=true;
        this.GameMgr1.score=0;
        this.Difficulty.active=true;
    }
}

